package Tpackage;

public class Main {
    public static void main(String[] args) {
        Ticket ticket = new Ticket(); // 共享的票资源
        Thread[] windows = new Thread[4]; // 四个窗口

        for (int i = 0; i < 4; i++) {
            windows[i] = new Thread(new Window(ticket), "窗口" + (i + 1));
            windows[i].start();
        }
    }
}

